#ifndef __SERIAL_H
#define __SERIAL_H

#include <stdio.h>

#define printf Serial_Printf

extern uint8_t Serial_TxPacket[];
extern uint8_t Serial_RxPacket[];
extern uint8_t M;

void Serial_Init(void);
void Serial_SendByte(uint8_t Byte);
void Serial_SendArray(uint8_t *Array, uint16_t Length);
void Serial_SendString(char *String);
void Serial_SendNumber(uint32_t Number, uint8_t Length);
void Serial_Printf(char *format, ...);
void Serial_SendPacket(uint8_t a,uint8_t b,uint8_t c,uint8_t d);

uint8_t Serial_GetRxFlag(void);


void Serial3_Init(void);
void Serial3_SendByte(uint8_t Byte);
void Serial3_SendArray(uint8_t *Array, uint16_t Length);
void Serial3_SendString(char *String);
uint32_t Serial3_Pow(uint32_t X, uint32_t Y);
void Serial3_SendNumber(uint32_t Number, uint8_t Length);
int fputc3(int ch, FILE *f);
void Serial3_Printf(char *format, ...);
uint8_t Serial3_GetRxFlag(void);
uint8_t Serial_GetRxData(void);

#endif
